﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace iNet.Win32
{
	#region CW
	[Flags]
	public enum CW : uint
	{
		USEDEFAULT = 0x80000000,
	}
	#endregion
	#region DBT
	public enum DBT
	{
		CONFIGCHANGECANCELED = 0x0019,
		CONFIGCHANGED = 0x0018,
		CUSTOMEVENT = 0x8006,
		DEVICEARRIVAL = 0x8000,
		DEVICEQUERYREMOVE = 0x8001,
		DEVICEQUERYREMOVEFAILED = 0x8002,
		DEVICEREMOVECOMPLETE = 0x8004,
		DEVICEREMOVEPENDING = 0x8003,
		DEVICETYPESPECIFIC = 0x8005,
		DEVNODES_CHANGED = 0x0007,
		QUERYCHANGECONFIG = 0x0017,
		USERDEFINED = 0xffff
	}
	#endregion
	#region DBT_DEVTYP
	public enum DBT_DEVTYP : uint
	{
		DEVICEINTERFACE = 5,
		HANDLE = 6,
		OEM = 0,
		PORT = 3,
		VOLUME = 2,
	}
	#endregion
	#region DBTF
	public enum DBTF : uint
	{
		MEDIA = 1,
		NET = 2,
	}
	#endregion
	#region DEVICE_NOTIFY
	[Flags]
	public enum DEVICE_NOTIFY
	{
		WINDOW_HANDLE = 0x0,
		SERVICE_HANDLE = 0x1,
		ALL_INTERFACE_CLASSES = 0x4,
	}
	#endregion
	#region DWMWA
	public enum DWMWA
	{
		NCRENDERING_ENABLED = 1,
		NCRENDERING_POLICY = 2,
		TRANSITIONS_FORCEDISABLED = 3,
		ALLOW_NCPAINT = 4,
		CAPTION_BUTTON_BOUNDS = 5,
		NONCLIENT_RTL_LAYOUT = 6,
		FORCE_ICONIC_REPRESENTATION = 7,
		FLIP3D_POLICY = 8,
		EXTENDED_FRAME_BOUNDS = 9,
		HAS_ICONIC_BITMAP = 10,
		DISALLOW_PEEK = 11,
		EXCLUDED_FROM_PEEK = 12,
		CLOAK = 13,
		CLOAKED = 14,
		FREEZE_REPRESENTATION = 15,
		LAST = 16,
	}
	#endregion
	#region FILE
	[Flags]
	public enum FILE : uint
	{
		ATTRIBUTE_ARCHIVE = 0x20,
		ATTRIBUTE_ENCRYPTED = 0x4000,
		ATTRIBUTE_HIDDEN = 0x2,
		ATTRIBUTE_NORMAL = 0x80,
		ATTRIBUTE_OFFLINE = 0x1000,
		ATTRIBUTE_READONLY = 0x1,
		ATTRIBUTE_SYSTEM = 0x4,
		ATTRIBUTE_TEMPORARY = 0x100,
		FLAG_BACKUP_SEMANTICS = 0x2000000,
		FLAG_DELETE_ON_CLOSE = 0x4000000,
		FLAG_NO_BUFFERING = 0x20000000,
		FLAG_OPEN_NO_RECALL = 0x100000,
		FLAG_OPEN_REPARSE_POINT = 0x200000,
		FLAG_OVERLAPPED = 0x40000000,
		FLAG_POSIX_SEMANTICS = 0x100000,
		FLAG_RANDOM_ACCESS = 0x10000000,
		FLAG_SESSION_AWARE = 0x800000,
		LAG_SEQUENTIAL_SCAN = 0x8000000,
		FLAG_WRITE_THROUGH = 0x80000000,
	}
	#endregion
	#region FILE_SHARE
	[Flags]
	public enum FILE_SHARE : uint
	{
		DELETE = 0x4,
		READ = 0x1,
		WRITE = 0x2,
	}
	#endregion
	#region FileCreationDisposition
	[Flags]
	public enum FileCreationDisposition
	{
		CREATE_ALWAYS = 2,
		CREATE_NEW = 1,
		OPEN_ALWAYS = 4,
		OPEN_EXISTING = 3,
		TRUNCATE_EXISTING = 5,
	}
	#endregion
	#region FLASHW
	[Flags]
	public enum FLASHW : uint
	{
		ALL = 0x3,
		CAPTION = 0x1,
		STOP = 0x0,
		TIMER = 0x4,
		TIMERNOFG = 0xC,
		TRAY = 0x2,
	}
	#endregion
	#region FO
	public enum FO : uint
	{
		MOVE = 0x1,
		COPY = 0x2,
		DELETE = 0x3,
		RENAME = 0x4,
	}
	#endregion
	#region FOF
	[Flags]
	public enum FOF : uint
	{
		MULTIDESTFILES = 0x0001,
		CONFIRMMOUSE = 0x0002,
		SILENT = 0x0004, // don't create progress/report
		RENAMEONCOLLISION = 0x0008,
		NOCONFIRMATION = 0x0010, // Don't prompt the user.
		WANTMAPPINGHANDLE = 0x0020,  // Fill in SHFILEOPSTRUCT.hNameMappings
		ALLOWUNDO = 0x0040,
		FILESONLY = 0x0080,  // on *.*, do only files
		SIMPLEPROGRESS = 0x0100,  // means don't show names of files
		NOCONFIRMMKDIR = 0x0200,  // don't confirm making any needed dirs
		NOERRORUI = 0x0400,  // don't put up error UI
		NOCOPYSECURITYATTRIBS = 0x0800,  // dont copy NT file Security Attributes
		NORECURSION = 0x1000,  // don't recurse into directories.
		NO_CONNECTED_ELEMENTS = 0x2000,  // don't operate on connected elements.
		WANTNUKEWARNING = 0x4000,  // during delete operation, warn if nuking instead of recycling (partially overrides FOF_NOCONFIRMATION)
		NORECURSEREPARSE = 0x8000,  // treat reparse points as objects, not containers
	}
	#endregion
	#region GENERIC
	[Flags]
	public enum GENERIC : uint
	{
		ALL = 0x10000000,
		READ = 0x80000000,
		WRITE = 0x40000000,
		EXECUTE = 0x20000000,
	}
	#endregion
	#region GUID_DEVINTERFACE
	public static class GUID_DEVINTERFACE
	{
		public static readonly Guid BRIGHTNESS = new Guid("FDE5BBA4-B3F9-46FB-BDAA-0728CE3100B4");
		public static readonly Guid BTHPORT = new Guid("0850302A-B344-4fda-9BE9-90576B8D46F0");
		public static readonly Guid CDCHARGER = new Guid("53F56312-B6BF-11D0-94F2-00A0C91EFB8B");
		public static readonly Guid CDROM = new Guid("53F56308-B6BF-11D0-94F2-00A0C91EFB8B");
		public static readonly Guid COMPORT = new Guid("86E0D1E0-8089-11D0-9CE4-08003E301F73");
		public static readonly Guid DISK = new Guid("53F56307-B6BF-11D0-94F2-00A0C91EFB8B");
		public static readonly Guid DISPLAY_ADAPTER = new Guid("5B45201D-F2F2-4F3B-85BB-30FF1F953599");
		public static readonly Guid FLOPPY = new Guid("53F56311-B6BF-11D0-94F2-00A0C91EFB8B");
		public static readonly Guid HID = new Guid("4D1E55B2-F16F-11CF-88CB-001111000030");
		public static readonly Guid I2C = new Guid("2564AA4F-DDDB-4495-B497-6AD4A84163D7");
		public static readonly Guid IMAGE = new Guid("6BDD1FC6-810F-11D0-BEC7-08002BE2092F");
		public static readonly Guid KEYBOARD = new Guid("884b96c3-56ef-11d1-bc8c-00a0c91405dd");
		public static readonly Guid MEDIUMCHARGER = new Guid("53F56310-B6BF-11D0-94F2-00A0C91EFB8B");
		public static readonly Guid MODEN = new Guid("2C7089AA-2E0E-11D1-B114-00C04FC2AAE4");
		public static readonly Guid MONITOR = new Guid("E6F07B5F-EE97-4a90-B076-33F57BF4EAA7");
		public static readonly Guid MOUSE = new Guid("378DE44C-56EF-11D1-BC8C-00A0C91405DD");
		public static readonly Guid NET = new Guid("CAC88484-7515-4C03-82E6-71A87ABAC361");
		public static readonly Guid OPM = new Guid("BF4672DE-6B4E-4BE4-A325-68A91EA49C09");
		public static readonly Guid PARALLEL = new Guid("97F76EF0-F883-11D0-AF1F-0000F800845C");
		public static readonly Guid PARCLASS = new Guid("811FC6A5-F728-11D0-A537-0000F8753ED1");
		public static readonly Guid PARTITION = new Guid("53F5630A-B6BF-11D0-94F2-00A0C91EFB8B");
		public static readonly Guid SERENUM_BUS_ENUMERATOR = new Guid("4D36E978-E325-11CE-BFC1-08002BE10318");
		public static readonly Guid SIDESHOW = new Guid("152E5811-FEB9-4B00-90F4-D32947AE1681");
		public static readonly Guid STORAGEPORT = new Guid("2ACCFE60-C130-11D2-B082-00A0C91EFB8B");
		public static readonly Guid TAPE = new Guid("53F5630B-B6BF-11D0-94F2-00A0C91EFB8B");
		public static readonly Guid USB_DEVICE = new Guid("A5DCBF10-6530-11D2-901F-00C04FB951ED");
		public static readonly Guid USB_HOST_CONTROLLER = new Guid("3ABF6F2D-71C4-462A-8A92-1E6861E6AF27");
		public static readonly Guid USB_HUB = new Guid("F18A0E88-C30C-11D0-8815-00A0C906BED8");
		public static readonly Guid VIDEO_OUTPUT_ARRIVAL = new Guid("1AD9E4F0-F88D-4360-BAB9-4C2D55E564CD");
		public static readonly Guid VOLUME = new Guid("53F5630D-B6BF-11D0-94F2-00A0C91EFB8B");
		public static readonly Guid WPD = new Guid("6AC27878-A6FA-4155-BA85-F98F491D4F33");
		public static readonly Guid WPD_PRIVATE = new Guid("BA0C718F-4DED-49B7-BDD3-FABE28661211");
		public static readonly Guid WRITEONCEDISK = new Guid("53F5630C-B6BF-11D0-94F2-00A0C91EFB8B");
	}
	#endregion
	#region GWL
	public enum GWL
	{
		WNDPROC = (-4),
		HINSTANCE = (-6),
		HWNDPARENT = (-8),
		STYLE = (-16),
		EXSTYLE = (-20),
		USERDATA = (-21),
		ID = (-12),
	}
	#endregion
	#region INVALID
	public static class INVALID
	{
		public static readonly IntPtr HANDLE_VALUE = new IntPtr(-1);
	}
	#endregion
	#region MAX
	public enum MAX
	{
		PATH = 260,
		VALUE = 260,
	}
	#endregion
	#region MONITOR
	[Flags]
	public enum MONITOR
	{
		DEFAULTTONULL = 0x0,
		DEFAULTTOPRIMARY = 0x1,
		DEFAULTTONEAREST = 0x2,
	}
	#endregion
	#region MONITORINFOF
	[Flags]
	public enum MONITORINFOF
	{
		PRIMARY = 0x1,
	}
	#endregion
	#region SC
	public enum SC
	{
		CLOSE = 0xF060,
		CONTEXTHELP = 0xF180,
		DEFAULT = 0xF160,
		HOTKEY = 0xF150,
		HSCROLL = 0xF080,
		ISSECURE = 0x1,
		KEYMENU = 0xF100,
		MAXIMIZE = 0xF030,
		MINIMIZE = 0xF020,
		MONITORPOWER = 0xF170,
		MOUSEMENU = 0xF090,
		MOVE = 0xF010,
		NEXTWINDOW = 0xF040,
		PREVWINDOW = 0xF050,
		RESTORE = 0xF120,
		SCREENSAVE = 0xF140,
		SIZE = 0xF000,
		TASKLIST = 0xF130,
		VSCROLL = 0xF070,
	}
	#endregion
	#region SEE_MASK
	public enum SEE_MASK : uint
	{
		DEFAULT = 0,
		CLASSNAME = 0x1,
		CLASSKEY = 0x3,
		IDLIST = 0x4,
		INVOKEIDLIST = 0xC,
		ICON = 0x10,
		HOTKEY = 0x20,
		NOCLOSEPROCESS = 0x40,
		CONNECTNETDRV = 0x80,
		NOASYNC = 0x100,
		DOENVSUBST = 0x200,
		FLAG_NO_UI = 0x400,
		UNICODE = 0x4000,
		NO_CONSOLE = 0x8000,
		ASYNCOK = 0x100000,
		NOQUERYCLASSSTORE = 0x1000000,
		HMONITOR = 0x200000,
		NOZONECHECKS = 0x800000,
		WAITFORINPUTIDLE = 0x2000000,
		FLAG_LOG_USAGE = 0x4000000,
		FLAG_HINST_IS_SITE = 0x8000000,
	}
	#endregion
	#region SHGFI
	[Flags]
	public enum SHGFI : uint
	{
		ICON = 0x000000100,
		DISPLAYNAME = 0x000000200,
		TYPENAME = 0x000000400,
		ATTRIBUTES = 0x000000800,
		ICONLOCATION = 0x000001000,
		EXETYPE = 0x000002000,
		SYSICONINDEX = 0x000004000,
		LINKOVERLAY = 0x000008000,
		SELECTED = 0x000010000,
		ATTR_SPECIFIED = 0x000020000,
		LARGEICON = 0x000000000,
		SMALLICON = 0x000000001,
		OPENICON = 0x000000002,
		SHELLICONSIZE = 0x000000004,
		PIDL = 0x000000008,
		USEFILEATTRIBUTES = 0x000000010,
		ADDOVERLAYS = 0x000000020,
		OVERLAYINDEX = 0x000000040,
	}
	#endregion
	#region SW
	public enum SW
	{
		HIDE = 0,
		MAXIMIZE = 3,
		MINIMIZE = 6,
		RESTORE = 9,
		SHOW = 5,
		SHOWDEFAULT = 10,
		SHOWMAXIMIZE = 3,
		SHOWMINIMIZE = 2,
		SHOWMINNOACTIVE = 7,
		SHOWNA = 8,
		SHOWNOACTIVE = 4,
		SHOWNORMAL = 1,
	}
	#endregion
	#region SWP
	[Flags]
	public enum SWP : uint
	{
		DRAWFRAME = 0x0020,
		FRAMECHANGED = 0x0020,
		HIDEWINDOW = 0x0080,
		NOACTIVATE = 0x0010,
		NOCOPYBITS = 0x0100,
		NOMOVE = 0x0002,
		NOOWNERZORDER = 0x0200,
		NOREDRAW = 0x0008,
		NOREPOSITION = 0x0200,
		NOSENDCHANGING = 0x0400,
		NOSIZE = 0x0001,
		NOZORDER = 0x0004,
		SHOWWINDOW = 0x0040,
	}
	#endregion
	#region WM
	public enum WM
	{
		COPYDATA = 0x004a,
		DWMCOMPOSITIONCHANGED = 0x031e,
		GETMINMAXINFO = 0x0024,
		SYSCOMMAND = 0x0112,
		WINDOWPOSCHANGING = 0x0046,
		USER = 0x0400,
	}
	#endregion
	#region WS
	[Flags]
	public enum WS
	{
		OVERLAPPED = 0x00000000,
		POPUP = unchecked((int)0x80000000),
		CHILD = 0x40000000,
		MINIMIZE = 0x20000000,
		VISIBLE = 0x10000000,
		DISABLED = 0x08000000,
		CLIPSIBLINGS = 0x04000000,
		CLIPCHILDREN = 0x02000000,
		MAXIMIZE = 0x01000000,
		CAPTION = 0x00C00000,
		BORDER = 0x00800000,
		DLGFRAME = 0x00400000,
		VSCROLL = 0x00200000,
		HSCROLL = 0x00100000,
		SYSMENU = 0x00080000,
		THICKFRAME = 0x00040000,
		GROUP = 0x00020000,
		TABSTOP = 0x00010000,
		MINIMIZEBOX = 0x00020000,
		MAXIMIZEBOX = 0x00010000,
		TILED = OVERLAPPED,
		ICONIC = MINIMIZE,
		SIZEBOX = THICKFRAME,
		TILEDWINDOW = OVERLAPPEDWINDOW,
		OVERLAPPEDWINDOW = (OVERLAPPED | CAPTION | SYSMENU | THICKFRAME | MINIMIZEBOX | MAXIMIZEBOX),
		POPUPWINDOW = (POPUP | BORDER | SYSMENU),
		CHILDWINDOW = CHILD,
	}
	#endregion
	#region WS_EX
	[Flags]
	public enum WS_EX
	{
		DLGMODALFRAME = 0x00000001,
		NOPARENTNOTIFY = 0x00000004,
		TOPMOST = 0x00000008,
		ACCEPTFILES = 0x00000010,
		TRANSPARENT = 0x00000020,
		MDICHILD = 0x00000040,
		TOOLWINDOW = 0x00000080,
		WINDOWEDGE = 0x00000100,
		CLIENTEDGE = 0x00000200,
		CONTEXTHELP = 0x00000400,
		RIGHT = 0x00001000,
		LEFT = 0x00000000,
		RTLREADING = 0x00002000,
		LTRREADING = 0x00000000,
		LEFTSCROLLBAR = 0x00004000,
		RIGHTSCROLLBAR = 0x00000000,
		CONTROLPARENT = 0x00010000,
		STATICEDGE = 0x00020000,
		APPWINDOW = 0x00040000,
		OVERLAPPEDWINDOW = (WINDOWEDGE | CLIENTEDGE),
		PALETTEWINDOW = (WINDOWEDGE | TOOLWINDOW | TOPMOST),
		LAYERED = 0x00080000,
		NOINHERITLAYOUT = 0x00100000, // Disable inheritence of mirroring by children
		LAYOUTRTL = 0x00400000, // Right to left mirroring
		COMPOSITED = 0x02000000,
		NOACTIVATE = 0x08000000,
	}
	#endregion
}
